// pages/newsDetail/newsDetail.js
Page({
    data: {
        content: '',
        title: '',
        time: '',
    },

    onLoad(options) {
        console.log(options.id);
        if (options) {
            this.request({
                url: 'user/my/news/detail',
                data: {
                    id: options.id,
                },
            }).then(res => {
                this.setData({
                    content: res.data.content,
                    title: res.data.title,
                    time: res.data.created_at,
                });
            });
        }
    },

    onShow() {},
});
